﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;

namespace AutoAllocService.Map.Models
{
    public class DriverModel
    {
        /// <summary>是否删除</summary>
        [JsonProperty("IsDeleted")]
        public bool IsDeleted { set; get; } = false;

        /// <summary>司机 ID</summary>
        [JsonProperty("DID")]
        public Guid DID { set; get; }

        /// <summary>司机名称</summary>

        [JsonProperty("Name")]
        [Required]
        public string Name { set; get; } = "";

        /// <summary>司机工号</summary>

        [JsonProperty("Code")]
        [Required]
        public string Code { set; get; } = "";

        /// <summary>手机号码</summary>

        [JsonProperty("Phone")]
        [Required]
        public string Phone { set; get; } = "";

        /// <summary>头像地址</summary>
        [JsonProperty("Avatar")]
        public string Avatar { set; get; } = "";

        /// <summary>性别</summary>

        [JsonProperty("Gender")]
        [Required]
        public string Gender { set; get; } = "";

        /// <summary>身份证号码</summary>

        [JsonProperty("IDCard")]
        [Required]
        [MaxLength(20)]
        public string IDCard { set; get; } = "";

        /// <summary>驾照档案编号</summary>

        [JsonProperty("ArchivesNumber")]
        [Required]
        public string ArchivesNumber { set; get; }

        /// <summary>居住地址</summary>

        [JsonProperty("Address")]
        [Required]
        public string Address { set; get; } = "";

        /// <summary>状态</summary>
        [JsonProperty("State")]
        public string State { set; get; } = "";

        /// <summary>是否被锁定</summary>
        [JsonProperty("IsLocked")]
        public bool IsLocked { set; get; } = false;

        /// <summary>区域id</summary>
        [JsonProperty("AreaId")]
        public int AreaId { set; get; } = 0;

        /// <summary>简介</summary>
        [JsonProperty("Notes")]
        public string Notes { set; get; } = "";

        /// <summary>
        ///     供应商ID
        /// </summary>
        public Guid SupplierId { get; set; }

        /// <summary>
        ///     供应商编号
        /// </summary>
        public string SupplierCode { get; set; }
    }
}